﻿Imports System.Configuration
''' <summary>
''' Método para obtener la cadena de conexión del Web.Config
''' </summary>
''' <remarks></remarks>
Public Class AdministradorCN
    Public Shared Function Conexion() As String
        Try
            Dim strCadena As String

            strCadena = ConfigurationManager.ConnectionStrings("Conexion.Cadena").ToString()

            Return strCadena
        Catch ex As Exception
            'Dim objLog As New logDH
            'objLog.Registra_Excepcion(ex.Message, ex.Source & " - Function Conexion")
            Throw ex
        End Try
    End Function
    Public Shared Function Conexion_DB2() As String
        Try
            Dim strCadena As String
            strCadena = ConfigurationManager.ConnectionStrings("Conexion.DBC_ACCESO").ToString()
            Return strCadena
        Catch ex As Exception
            'Dim objLog As New logDH
            'objLog.Registra_Excepcion(ex.Message, ex.Source & " - Function Conexion_DB2")
            Throw ex
        End Try
    End Function
End Class
